<?php 
date_default_timezone_set("Australia/Melbourne");
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body style="font-family:Arial, Helvetica, sans-serif">

<h2>Staff Who Pass Trainee, But still Missing Document</h2>
<table width="800" border="1" cellspacing="0" cellpadding="10">
  <tr>
    <td>No</td>
    <td>Staff</td>
    <td>Shop</td>
    <td>Registration</td>
    <td>Expire</td>
    <td>Current Position</td>
  </tr>
  <?php foreach($this->arrRes as $k => $v) {?>
  <tr>
    <td><?php echo $k + 1;?></td>
    <td><?php echo ucfirst($v[0])?>[<?php echo ucfirst($v[1])?>]</td>
    <td><?php echo $v[2]?></td>
    <td><?php echo $v[3]?></td>
    <td><?php echo $v[4]?></td>
    <td><?php echo $v[5]?></td>
  </tr>
  <?php }?>
</table>

</body>
</html>
<?php
$mailbody = ob_get_contents();
if($this->ifemail == "yes"){
$mail = new Model_Emailshandler();
$mail->sendNormalEmail($this->email,"Pass Trainee Staff Who Still Missing Documents", $mailbody);
}
?>